package com.chanel.iamframework.core.domain;

import java.util.ArrayList;
import java.util.List;

import javax.validation.constraints.NotNull;

public class Application {
	
    private Long applicationId;

    private String applicationName;

    private String applicationLabel;

    private String applicationDescription;

    private List<Group> groups = new ArrayList<Group>();
    
    private List<Role> roles = new ArrayList<Role>();
    
    private List<User> users = new ArrayList<User>();
    
    public Application() {}
    
    public Application(String applicationName, String applicationLabel, String applicationDescription) {
        this.applicationName = applicationName;
        this.applicationLabel = applicationLabel;
        this.applicationDescription = applicationDescription;
    }
    
    public Application(String applicationName, String applicationLabel) {
    	this(applicationName, applicationLabel, null);
    }
    
    public List<Role> getRoles() {
		return roles;
	}

	public void setRoles(List<Role> roles) {
		this.roles = roles;
	}

	public List<User> getUsers() {
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}

	public List<Group> getGroups() {
		return groups;
	}

	public void setGroups(List<Group> groups) {
		this.groups = groups;
	}

	public Long getApplicationId() {
        return applicationId;
    }

    public void setApplicationId(Long applicationId) {
        this.applicationId = applicationId;
    }

    @NotNull
    public String getApplicationName() {
        return applicationName;
    }

    public void setApplicationName(String applicationName) {
        this.applicationName = applicationName;
    }

    @NotNull
    public String getApplicationLabel() {
        return applicationLabel;
    }

    public void setApplicationLabel(String applicationLabel) {
        this.applicationLabel = applicationLabel;
    }

    public String getApplicationDescription() {
        return applicationDescription;
    }

    public void setApplicationDescription(String applicationDescription) {
        this.applicationDescription = applicationDescription;
    }
    
    @Override
    public String toString() {
    	return "Application ==> {" +
    			"applicationId = " + applicationId +
    			", applicationName = " + applicationName +
    			", applicationLabel = " + applicationLabel +
    			", applicationDescription = " + applicationDescription +
    			"}";
    }
}